//Date对象下的方法(api)
//var now = new Date(2018,9,1,8,30);
//console.log(now.getFullYear());
//console.log(now.getMonth());// 0 ~ 11
//console.log(now.getDate());
//console.log(now.getHours());
//console.log(now.getMinutes());
//console.log(now.getSeconds());

//打印当前的时间形式为 2018年6月19日 10:36:00
//2020-8-20 20:15:30
var now = new Date(2020,7,20,10,45);
var year = now.getFullYear();
var month = now.getMonth()+1;
var date = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
//获取星期
var day = now.getDay();
var xq = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
//xq[day]
//console.log(xq[day]);
//获取距离计算机元年的时间
var milliTime = now.getTime();
console.log(milliTime);

//打印
//console.log(year + '年' + month + '月' + date + '日' + hours + ':' + minutes + ':' + seconds + xq[day]);







